export default {
  data() {
    return {
      typeForm: {
        1: {
          text: '代取外卖',
          bgColor: '#DBEAFE',
          color: '#2D68EC',
        },
        2: {
          text: '帮送',
          bgColor: '#FEF9C3',
          color: '#CA8A04',
        },
        3: {
          text: '帮买',
          bgColor: '#ffe6e6',
          color: '#FC3238',
        },
        4: {
          text: '上门喂养',
          bgColor: '#F3E8FF',
          color: '#9333EA',
        },
        5: {
          text: '宠物帮遛',
          bgColor: '#E3FACB',
          color: '#3DA316',
        },
      },
    };
  },
  mounted() {},
  methods: {
   menuButtonInfo() {
      let menuButtonInfo = 0;
      let titleBarHeight = 0;
      let statusBarHeight = 0;
      let safeAreaInsetsBottom = 0;
      let top = 0;
      let res = uni.getWindowInfo();
      try {
        menuButtonInfo = uni.getMenuButtonBoundingClientRect();
        statusBarHeight = res.statusBarHeight || menuButtonInfo.top;
        safeAreaInsetsBottom = res.screenHeight - res.safeArea.height - res.statusBarHeight;
        statusBarWidth = menuButtonInfo.width;
        titleBarHeight = (menuButtonInfo.top - res.statusBarHeight) * 2 + menuButtonInfo.height;
      } catch (error) {}
      let data = {
        statusBarHeight: statusBarHeight,
        safeAreaTop: res.safeArea.top,
        titleBarHeight: titleBarHeight,
        top: statusBarHeight + titleBarHeight,
        bottom: safeAreaInsetsBottom,
        topBottom: top + safeAreaInsetsBottom,
      };
      return data;
    },
    previewImageTap(urls, current = 1) {
      uni.previewImage({
        urls: urls,
        current: current,
        fail() {
          this.$uv.toast('预览图片失败');
        },
      });
    },
  },
};
